Data processing apparatus, input control apparatus, and control method

ABSTRACT

An input control apparatus, which accepts input of data from the outside and inputs the data to a bus in a data processing system in which a plurality of communication units are connected by the bus in a ring shape and data processed by processing units are delivered via the bus, controls acceptance of data based on the number of data items which should be output outside, are suspended from output, and remain on the bus.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to a data processing apparatus, inputcontrol apparatus, and control method for controlling input of data to aring-shaped bus.

Description of the Related Art

A method of transferring packets in accordance with priority hasconventionally been proposed as a method of performing efficient packettransfer in a data path control system in which a plurality of modulesare connected to be communicable and perform parallel processing.

Japanese Patent Laid-Open No. 2010-217959 discloses a method ofconnecting modules by a ring bus, and transferring a data packetprocessed by each module to a module at the next stage to execute aseries of processes. In the arrangement in Japanese Patent Laid-Open No.2010-217959, after a given module ends processing, it sends, onto thering bus, a signal containing an identifier for identifying the givenmodule. A module which performs the next processing stores in advancethe identifier of a module which executes immediately precedingprocessing, and when the signal contains the identifier, executes theprocessing. In Japanese Patent Laid-Open No. 2010-217959, when a modulesuspends processing, it transfers a signal containing informationrepresenting that the processing has been suspended. When this modulereceives, in response to the signal transmitted by it, a signalcontaining information representing that a succeeding module hassuspended processing, it determines that a module which executesimmediately succeeding processing cannot perform processing even iffurther information is transmitted, and temporarily stops transmissionof information. This implements efficient packet transfer using a smallstorage capacity in distributed control.

When output of data is suspended in output on the ring bus, it isnecessary to suppress or stop input to the ring bus. However, in themethod in Japanese Patent Laid-Open No. 2010-217959, a given module onlydetects whether a stall has occurred in a module which executesprocessing immediately after processing by the given module. If outputof data from the ring bus is suspended, the time corresponding to oneround of the ring bus is necessary to detect by each module that dataoutput from it has been suspended, and stop the output. A long time isrequired till the stop of input, and data are kept input till the stopof input. As a result, the number of stall packets increases, thetransfer efficiency greatly decreases, and a deadlock may occur.

SUMMARY OF THE INVENTION

According to one aspect of the present invention, there is provided atechnique of suppressing an increase in the number of packets which aresuspended and stay on a ring bus.

According to one aspect of the present invention, there is provided adata processing apparatus comprising: a plurality of communication unitsconfigured to be connected by a ring-shaped bus; and a plurality ofprocessing units corresponding to the respective communication unitsconfigured to process data supplied from the plurality of communicationunits, wherein when a processing unit corresponding to a firstcommunication unit out of the plurality of communication units is in adata unacceptable state, the first communication unit adds, to datawhich could not be accepted by the processing unit, stall informationrepresenting that the processing unit could not accept data, and makesthe data go around the ring-shaped bus, and a second communication unitout of the plurality of communication units suppresses input of data tothe ring-shaped bus based on the data to which the stall information isadded.

According to one aspect of the present invention, there is provided aninput control apparatus which accepts input of data from outside andinputs the data to a bus in a data processing system in which aplurality of communication units are connected by the bus in a ringshape and data processed by processing units are delivered via the bus,comprising: an acquisition unit configured to acquire the number of dataitems which are to be output outside, are suspended from output, andremain on the bus; and a control unit configured to control acceptanceof data based on the number of data items.

According to one aspect of the present invention, there is provided acontrol method for a data processing apparatus including a plurality ofcommunication units configured to be connected by a ring-shaped bus, anda plurality of processing units corresponding to the respectivecommunication units configured to process data supplied from theplurality of communication units, comprising: when a processing unitcorresponding to a first communication unit out of the plurality ofcommunication units is in a data unacceptable state, causing the firstcommunication unit to add, to data which could not be accepted by theprocessing unit, stall information representing that the processing unitcould not accept data, and make the data go around the ring-shaped bus;and causing a second communication unit out of the plurality ofcommunication units to suppress input of data to the ring-shaped busbased on the data to which the stall information is added.

According to one aspect of the present invention, there is provided acontrol method for an input control apparatus which accepts input ofdata from outside and inputs the data to a bus in a data processingsystem in which a plurality of communication units are connected by thebus in a ring shape and data processed by processing units are deliveredvia the bus, comprising: causing an acquisition unit to acquire thenumber of data items which are to be output outside, are suspended fromoutput, and remain on the bus; and causing a control unit to controlacceptance of data based on the number of data items.

Further features of the present invention will be apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram exemplifying the arrangement of a dataprocessing system;

FIG. 2 is a view exemplifying the data structure of a packet;

FIG. 3 is a block diagram exemplifying the arrangement of aninput/output unit;

FIG. 4 is a block diagram exemplifying the arrangement of a receptionunit;

FIG. 5 is a block diagram exemplifying the arrangement of a transmissionunit;

FIG. 6 is a block diagram exemplifying the arrangement of a transmissioninterval control unit;

FIG. 7 is a block diagram exemplifying the arrangement of a transmissioninterval control unit in the second embodiment;

FIG. 8 is a block diagram showing the schematic arrangement of aninformation processing apparatus; and

FIG. 9 is a block diagram showing a schematic arrangement regarding datatransfer between an image processing unit and a system control unit.

DESCRIPTION OF THE EMBODIMENTS

An exemplary embodiment(s) of the present invention will now bedescribed in detail with reference to the drawings. It should be notedthat the relative arrangement of the components, the numericalexpressions and numerical values set forth in these embodiments do notlimit the scope of the present invention unless it is specificallystated otherwise.

<<First Embodiment>>

The schematic arrangement of an information processing apparatusaccording to the first embodiment of the present invention will bedescribed with reference to FIG. 8.

An image reading unit 820 includes a CCD sensor 824 and analog signalprocessing unit 826. The CCD sensor 824 converts the image of anoriginal 800 that is formed on the CCD sensor 824 via a lens 822, into R(Red), G (Green), and B (Blue) analog signals. The analog signalprocessing unit 826 receives the converted image information, performscorrection and the like for the respective R, G, and B colors, and thenperforms analog-to-digital conversion (A/D conversion). The digitalfull-color signals (to be referred to as multi-level digital imagesignals hereinafter) are input to an image processing unit 830. Theimage processing unit 830 performs input correction processing, spatialfilter processing, color space conversion, density correctionprocessing, and halftone processing for the digital image signals, andoutputs the processed digital image signals to an image output unit 840.The image output unit 840 includes, for example, a printout unit (notshown) using an inkjet head, thermal head, or the like. The image outputunit 840 prints an image on paper in accordance with the input digitalimage signals.

A system control unit 810 includes an arithmetic control CPU 812, a ROM814 which stores permanent data and programs, and a RAM 816 used totemporarily save data and load a program. The system control unit 810controls the image reading unit 820, image processing unit 830, imageoutput unit 840, and the like, and performs centralized control of asequence in the apparatus. An external storage device 818 is a medium(flash memory or removable storage medium) which stores parameters andprograms used in the apparatus. The RAM 816 allows loading data,programs, and the like from the ROM 814 and external storage device 818.

Note that data transfer between the system control unit 810 and theimage processing unit 830 is performed by, for example, DMAC (DirectMemory Access Controller) (not shown).

FIG. 9 shows a schematic arrangement regarding data transfer between theimage processing unit 830 and the system control unit 810.

When no stall signal is asserted from an output terminal 354 (to bedescribed in detail later) of an input/output unit 101, a DMAC 903transfers data held in the RAM 816 of the data system control unit 810to the image processing unit 830 by direct memory access. When a stallsignal is asserted, the DMAC 903 holds data. When no stall signal isasserted from an input terminal 353 (to be described in detail later) ofthe input/output unit 101, data processed by the image processing unit830 is output to the DMAC 903. When a stall signal is asserted, theinput/output unit 101 suspends output of data, and supplies data as astall packet to a ring bus 104 (to be described in detail later). Then,a DMAC 904 transfers the data to the RAM 816 and external storage device818 of the data system control unit 810, the image output unit 840, andthe like by direct memory access.

(Data Processing System)

FIG. 1 shows the image processing unit 830 of FIG. 8 in detail. FIG. 1is a block diagram exemplifying the schematic arrangement of a dataprocessing system in which respective processing modules are connectedby a ring-shaped bus to deliver data and sequentially process it. Thedata processing system includes the input/output unit 101 forinputting/outputting data, a plurality of communication units 102-1 to102-n for delivering data to each other, and a plurality of processingunits 103-1 to 103-n which correspond to the respective communicationunits 102-1 to 102-n and process data.

The input/output unit 101 performs, for example, input/output control ofdata between the data processing system and the outside. In thefollowing description, the “outside of the data processing system” meansthe remaining functional units in the apparatus including the dataprocessing system. In FIG. 8, these functional units are the systemcontrol unit 810, image reading unit 820, and image output unit 840.

The present invention is applicable to even an external apparatus whichexists separately from the apparatus including the data processingsystem. In the input/output unit 101, DMACs may be arranged at an inputterminal 105 and output terminal 106, respectively. In this case, theDMAC packetizes image data or a parameter held in the RAM 816, andinputs the packet to the image processing unit 830. Also, the DMACdepacketizes a packet output from the image processing unit 830, andtransfers the data to the RAM 816 or CPU 812.

The communication units 102-1 to 102-n are connected to the adjacentcommunication units 102, and serve as part of the ring bus 104 totransmit data received from a specific direction (first direction) inthe other direction (second direction). Note that the communicationunits 102-1 and 102-n are connected to the adjacent communication units102, and also connected to the input/output unit 101. The communicationunits 102-1 to 102-n are connected to the processing units 103-1 to103-n, respectively. That is, the communication units 102-1 to 102-nform the ring bus 104 together with the input/output unit 101,transmit/receive data to/from the adjacent communication units 102 andinput/output unit 101, and also transmit/receive data to/from theprocessing units 103.

Data input via the input terminal 105 is input to the communication unit102-1 via the input/output unit 101. Note that data is packetized, andthe packet flows in one direction on the ring bus 104 (on the ring). Thecommunication unit 102 receives a packet from the ring bus 104, andseparates the packet in accordance with preset information to extractnecessary data. When the processing unit 103 (to be referred to as a“corresponding processing unit” hereinafter) directly connected to thecommunication unit 102 can process the extracted data, the communicationunit 102 outputs the data to the corresponding processing unit 103.

The processing unit 103 performs predetermined data processes (forexample, color space conversion and resolution conversion) for thereceived data, and outputs the processed data to the correspondingcommunication unit 102. The communication unit 102 determines whetherthe data can be output to the ring bus 104, and if the data can beoutput, packetizes the data input from the corresponding processing unit103, and sends the packet to the ring bus 104. A communication unit 102corresponding to a processing unit 103 which performs the nextprocessing for data contained in the sent packet separates the packet toextract the data. Then, the communication unit 102 causes thecorresponding processing unit 103 to execute the processing in theabove-described manner. By setting in advance the order of theprocessing units 103 which process data, the processing units 103-1 to103-n sequentially process data. After the end of set data processing,the processed data is output from the output terminal 106 via theinput/output unit 101.

(Data Structure)

FIG. 2 is a view exemplifying the data structure of a packet flowingthrough the ring bus 104. The packet contains a valid flag 201, stallflag 202, count value 203, node ID 204, and data 205. The valid flag 201is a data area where a value indicating whether the packet is valid isstored. The stall flag 202 is a data area where a value indicating thatprocessing is suspended for data contained in the packet is stored. Thecount value 203 is a value indicating the data transmission order. Thenode ID 204 is a data area where a value indicating an ID foridentifying logical connection of data is stored. The data 205 is a dataarea where data input from or to be output to the communication unit isstored.

In the following description, a packet in which the valid flag 201 ofthe packet is “invalid” will be called a “null packet”. Thecommunication unit 102 can replace a null packet on the ring bus with avalid packet. A “valid” stall flag 202 means that a given processingunit 103 cannot process data and the corresponding communication unit102 supplies a packet containing the unprocessed data onto the ring bus.In the following description, a packet in which the stall flag 202 isvalid will be called a “stall packet”.

The count value 203 is used when, for example, processes should beexecuted in the input order. When a value managed inside thecommunication unit 102 and the count value 203 match each other, thecommunication unit 102 can extract data from the packet, and output itto the processing unit 103. The node ID 204 contains the ID of aprocessing unit 103 which should process data contained in the packet,or the corresponding communication unit 102. When the node ID 204matches the ID of the communication unit 102 or that of thecorresponding processing unit 103, the communication unit 102 determinesthat data contained in the packet should be processed by thecorresponding processing unit 103.

Upon receiving a packet from the ring bus 104, the communication unit102 analyzes the contents and decides subsequent processing inaccordance with the contents. More specifically, the communication unit102 extracts the valid flag 201, count value 203, and node ID 204 fromthe packet and decides, based on the contents, how to handle the packet.

For example, when the valid flag 201 of the packet is valid, the countvalue 203 and node ID 204 match values managed inside the communicationunit 102, and the corresponding processing unit 103 can process data,the communication unit 102 outputs data contained in the packet to thecorresponding processing unit 103. In this case, at the same time asthis processing, the communication unit 102 invalidates the valid flag201 and stall flag 202 of the received packet, and outputs a null packetonto the ring bus 104.

In contrast, when the valid flag 201 is valid, the count value 203 andnode ID 204 match values managed inside the communication unit 102, andthe corresponding processing unit 103 cannot process data, thecommunication unit 102 outputs a stall packet onto the ring bus 104.That is, the communication unit 102 validates the stall flag 202 in thepacket received from the ring bus 104, and sends the packet onto thering bus 104. Also, when the valid flag 201 is valid, the node ID 204matches a value managed inside the communication unit 102, and the countvalue 203 does not match a value managed inside the communication unit102, the communication unit 102 changes the packet into a stall packetand sends it onto the ring bus 104.

When the valid flag 201 is valid, and the node ID 204 does not match avalue managed inside the communication unit 102, the communication unit102 directly sends the received packet onto the ring bus 104 withoutchanging its contents.

Similarly, the input/output unit 101 performs the same analysis as thatin the communication unit 102 for a packet received from the ring bus104, and when data can be output from the output terminal 106, outputsthe data. The above-described operations of the input/output unit 101and communication unit 102 can implement data delivery and processes ina desired order.

(Arrangement of Input/Output Unit)

FIG. 3 is a block diagram exemplifying the schematic arrangement of theinput/output unit 101. As shown in FIG. 3, the input/output unit 101includes a reception unit 301, buffer 302, selector 303, andtransmission unit 304. An output terminal 359 of the input/output unit101 is connected to the adjacent communication unit 102-1 (downstream inthe data transfer direction: second direction). An input terminal 357 isconnected to the adjacent communication unit 102-n on the other side(upstream in the data transfer direction).

An output terminal 351, an output terminal 352, and the input terminal353 represent in more detail the output terminal 106 shown in FIG. 1.The output terminal 351 is a terminal which outputs a valid signalindicating whether a signal to be output is valid. The output terminal352 is a terminal which, when data can be output, outputs the data. Theinput terminal 353 is a terminal which inputs a stall signal indicatingwhether data can be output. When the stall signal is valid (stall), thereception unit 301 cannot output data from the output terminal 352.

The output terminal 354, an input terminal 355, and an input terminal356 represent in more detail the input terminal 105 shown in FIG. 1. Theoutput terminal 354 is a terminal which outputs a stall signalindicating whether output data from the transmission unit 304 can beoutput via the selector 303. When the stall signal is valid (stall),input of data to the transmission unit 304 stops. The input terminal 355is a terminal which receives data from the outside. The input terminal356 receives a valid signal indicating whether data input from theoutside is valid.

The reception unit 301 monitors a packet input from the adjacentcommunication unit 102-n (upstream in the data transfer direction) viathe input terminal 357. At the same time, the packet is input to thebuffer 302, temporarily held in the buffer, and output to the selector303 in the next clock cycle.

The reception unit 301 determines whether the valid flag 201 is valid,and the count value 203 and node ID 204 match values held in thereception unit 301, respectively. Further, when data can be output (whena stall signal input from the input terminal 353 is not in the stallstate), the reception unit 301 receives the packet which satisfies theseconditions. The reception unit 301 then validates the valid signal atthe output terminal 351, and outputs the data outside via the outputterminal 352. After receiving the data of the packet, a count valuewhich is managed in the reception unit 301 and accessory to the data isincremented. At the same time as this operation, the reception unit 301controls to clear (invalidate), via a signal line 360, the valid flag201 of the packet stored in the buffer 302. Also, the reception unit 301clears, via a signal line 361, the value of the stall flag 202 of thepacket stored in the buffer 302. Further, the reception unit 301 outputsthe value of a stall counter 405 (to be described later) to thetransmission unit 304 via a signal line 365.

The transmission unit 304 monitors the valid flag 201 of an outputpacket (a signal line 358) in the buffer 302 via a signal line 363. Whenthe valid flag 201 of the packet is valid, the transmission unit 304causes the selector 303 to preferentially output the output packet inthe buffer 302 to the output terminal 359. In this case, thetransmission unit 304 cannot output a packet containing input data fromthe input terminal 355. To suspend data input, the transmission unit 304validates (suspends) a stall signal to be output from the outputterminal 354. When the valid flag 201 of an output packet in the buffer302 is invalid, the stall signal to be output from the output terminal354 is controlled by a stall counter value from the signal line 365 anda stall signal from the input terminal 353, which will be describedlater.

When external input data is valid (valid signal input from the inputterminal 356 is valid), and a timer 601 (to be described later) in thetransmission unit 304 is “0”, the transmission unit 304 generates apacket in which the input data is contained and the valid flag 201 isvalid. The transmission unit 304 adds, to the packet, a count valuemanaged inside the transmission unit 304 and a node ID set in aregister, and outputs the resultant packet to the selector 303 via asignal line 362. When the valid flag 201 of a packet from thetransmission unit 304 is valid and the valid flag 201 of a packet fromthe buffer 302 is invalid, the selector 303 sends, to the ring bus 104via the output terminal 359, the packet output from the transmissionunit 304. Note that generating a packet conceptually means storing datain a null packet flowing through the ring bus. After the packet isoutput, the count value managed inside the transmission unit 304 isincremented.

(Arrangement and Operation of Reception Unit)

The reception unit 301 will be described in detail with reference toFIG. 4. FIG. 4 is a block diagram exemplifying the schematic arrangementof the reception unit 301. As shown in FIG. 4, the reception unit 301includes a register 401 (storage unit), a counter 402, a comparator 403,a determination unit 404, and the stall counter 405.

In the reception unit 301, the comparator 403 monitors and analyzes thevalid flag 201, count value 203, and node ID 204 of a packet on the ringbus that is input from the input terminal 357. First, the comparator 403determines whether the valid flag 201 of the input packet is valid. Ifthe valid flag 201 of the input packet is invalid, there is no data tobe output, and processing to be described later is not executed. To thecontrary, if the valid flag 201 is valid, the comparator 403 comparesthe node ID 204 of the packet with an input node ID stored in theregister 401, and determines whether these values match each other. Atthe same time, the comparator 403 compares the count value 203 of thepacket with the value of the counter 402, and determines whether thesevalues match each other. When the node IDs match each other as a resultof the comparison, the comparator 403 sets an input node ID matchingsignal to a value indicating “valid”, and when the count value matchesthe value of the counter 402, sets a count value matching signal to avalue indicating “valid”. Then, the comparator 403 outputs the packet tothe determination unit 404. When the node IDs or count values do notmatch each other, the comparator 403 sets the input node ID matchingsignal or count value matching signal to a value indicating “invalid”,and outputs the packet to the determination unit 404.

By using the determination result, the determination unit 404 executeseither (1) a reception operation of transmitting the data 205 outsidewhen data can be output outside, or (2) a stall operation of outputtinga stall packet to the buffer 302 when no data can be output. Theseoperations will be explained in detail.

(1) Reception Operation (Operation of Outputting Data to Output Terminal352)

When the input node ID matching signal and count value matching signalare “valid” and a stall signal received via the input terminal 353 is“invalid”, the determination unit 404 determines that data can be outputfrom the output terminal 352. In this case, the determination unit 404outputs a valid signal indicating “valid” via the output terminal 351,and outputs the data 205 of the packet via the output terminal 352.

At this time, the determination unit 404 transmits, to the buffer 302via the signal line 360, a control signal for clearing the valid flag201 of the packet. The buffer 302 invalidates (clears) the valid flag201 of the temporarily held packet in accordance with the controlsignal. At the same time, the determination unit 404 transmits, to thebuffer 302 via the signal line 361, a control signal for clearing thestall flag 202. In accordance with the control signal, the buffer 302invalidates the stall flag 202 of the temporarily held packet. Toacquire the next data, the determination unit 404 outputs a countvalidation signal indicating “valid” to the counter 402, and causes thecounter 402 to increment the count value (by one) in the next clockcycle. When the value of the stall counter 405 is larger than “0”, thevalue of the stall counter 405 is decremented (by one).

(2) Stall Operation (Operation of Outputting No Data to Output Terminal352)

If the determination unit 404 receives a stall signal indicating “valid(stall)” via the input terminal 353 when the input node ID matchingsignal and count value matching signal are valid, it determines that nodata can be output to the output terminal 352 though there is data to beoutput. In this case, the determination unit 404 transmits, to thebuffer 302 via the signal line 361, a control signal for validating thestall flag 202 of the packet. The buffer 302 validates (suspends) thestall flag 202 of the temporarily held packet. In addition, thedetermination unit 404 transmits, to the stall counter 405, a controlsignal indicating that output of data will be suspended, and causes thestall counter 405 to increment its value (by one). Also, when the inputnode ID matching signal is valid and the count value matching signal isinvalid, the determination unit 404 validates, via the signal line 361,the stall flag 202 of the packet temporarily held in the buffer 302, andincrements the stall counter 405. The stall counter 405 counts thenumber of packets which should be output outside, are suspended fromoutput, and remain on the ring bus 104.

In the stall operation, the contents of a packet temporarily held in thebuffer 302 are not changed except that the stall flag 202 is validated.

(Arrangement and Operation of Transmission Unit)

The transmission unit 304 will be described in detail with reference toFIG. 5. FIG. 5 is a block diagram exemplifying the schematic arrangementof the transmission unit 304. As shown in FIG. 5, the transmission unit304 includes a register 501 (storage unit), counter 502, packetgeneration unit 503, and transmission interval control unit 504.

The valid flag 201 of an output packet in the buffer 302 is input to thepacket generation unit 503 and transmission interval control unit 504via the signal line 363. Data and a data validation signal are input tothe packet generation unit 503 via the input terminals 355 and 356,respectively. The packet generation unit 503 outputs a generated packetto the selector 303 via the signal line 362. The transmission intervalcontrol unit 504 acquires, respectively from the signal line 365 andinput terminal 353, the value of the stall counter of the reception unit301 and a stall signal indicating whether data can be output. Thetransmission interval control unit 504 controls input of data from theoutside by outputting the stall signal from the output terminal 354, andcontrols the output interval of packets to the ring bus 104.

The packet generation unit 503 refers to a valid signal transferred viathe input terminal 356, and when the valid signal is valid, determinesthat data can be input from the outside via the input terminal 355. Whenthe stall signal output via the output terminal 354 is invalid, that is,it does not indicate the input stall state, the data from the outside isinput to the packet generation unit 503. Upon receiving the data, thepacket generation unit 503 generates a packet in which the data iscontained as the data 205, and the count value of the counter 502 and anoutput node ID set in the register 501 are set as the count value 203and node ID 204. At this time, the packet generation unit 503 sets thevalid flag of the packet to be generated to be valid, and the stall flagto be invalid. Then, the packet generation unit 503 outputs the packetto the selector 303. The packet generation unit 503 transmits a controlsignal to the counter 502 so that the counter 502 increments the countvalue (by one) in the next clock cycle.

Next, an example of the arrangement of the transmission interval controlunit 504 will be explained with reference to FIG. 6. The transmissioninterval control unit 504 includes the timer 601, a comparator 602, atransmission interval signal generation unit 603, a first register 604,and a timer register 605.

The timer 601 is a functional unit which controls the transmissioninterval. The timer 601 is formed from, for example, a down counterhaving a load function of counting down from a loaded value toward 0.When a packet generated by the packet generation unit 503 is output fromthe selector 303 to the ring bus, a transmission interval stored in thetimer register 605 is loaded in the next cycle. The timer register 605is a register for setting a transmission interval in the timer 601. Thetransmission interval to be set here is an interval at which theinput/output unit 101 packetizes data from the outside and transmits thepacket onto the ring bus. The communication units 102-1 to 102-n mayhave this function. For example, for n=12, the transmission interval isset to 4. Output suppressing control is applied based on a packet whichhas been output from the communication unit 102 and is suspended fromprocessing. Accordingly, the number of packets output from thecommunication unit 102 onto the ring bus can be suppressed to 3.

For example, as shown in FIG. 6, information representing that a packetgenerated by the packet generation unit 503 has been output from theselector 303 to the ring bus may be acquired from a control signaltransmitted to the counter 502. Alternatively, the timer 601 may benotified of this using another mechanism. After counting down to “0”,the timer 601 holds the value “0” until a value is loaded next.

The comparator 602 compares a stall counter value acquired via thesignal line 365 with a predetermined value (threshold) stored in thefirst register 604. If the stall counter value is equal to or largerthan the predetermined value, the comparator 602 outputs “1”; otherwise,outputs “0”. The first register 604 is a register which stores apredetermined value for evaluating the value of the stall counter 405.The predetermined value is smaller than the number of packets which canbe stored in one round of the ring bus. This is because, when a deadlockoccurs, the value of the stall counter 405 becomes a value equal to orlarger than the number of packets which can be stored in one round ofthe ring bus. If the value of the first register is set as this value,no deadlock can be prevented.

The transmission interval signal generation unit 603 generates a stallsignal which is output to the output terminal 354 and indicates whetherdata can be input. As is apparent from the above description, when thestall signal is valid (stall), it represents that data cannot be inputfrom the outside. When the stall signal is invalid, it represents thatdata can be input from the outside.

The operation of the transmission interval control unit 504 in FIG. 6will be explained. First, the values of the first register 604 and timerregister 605 are set as initial settings by a CPU (not shown) or thelike. Then, the comparator 602 compares a stall count value acquiredfrom the signal line 365 with a value set in the first register 604. Atthe same time, if the value of the timer 601 is not “0”, the timer 601is counted down. The transmission interval signal generation unit 603executes the following three different operations in accordance with thevalid flag 201 input via the signal line 363 and the value of an outputfrom the comparator 602.

(1) Case in which Valid Flag 201 Input from Signal Line 363 is Valid

Since the packet generation unit 503 cannot output a packet, a stallsignal indicating “valid” is output via the output terminal 354, andinput of data from the outside is suspended. When the valid flag 201 isinvalid, the following operation (2) or (3) is executed.

(2) Case in Which Output from Comparator 602 is “0”

Since the value of the stall counter 405 is smaller than thepredetermined value of the first register 604, the stall signal is setto be valid or invalid based on the value of the timer 601, and outputvia the output terminal 354. That is, when the value of the timer 601 is“0”, the stall signal is invalidated to accept data input from theoutside. In other cases, the stall signal is validated to suspend inputfrom the outside.

(3) Case in which Output from Comparator 602 is “1”

In this case, the value of the stall counter 405 is equal to or largerthan the predetermined value of the first register 604. This means thatthe frequency of occurrence of packets which have been suspended fromoutput in the reception unit 301 of the input/output unit 101 is high.At this time, if the stall signal received via the input terminal 353 isvalid, no data can be output outside from the output terminal 352. Inorder not to further increase the number of stall packets, thetransmission interval signal generation unit 603 outputs a stall signalindicating “valid” via the output terminal 354 to suspend input of datafrom the outside. In contrast, if the stall signal received via theinput terminal 353 is invalid, data can be output outside via the outputterminal 352. Hence, the stall signal to be output from the outputterminal 354 is controlled based on the value of the timer 601, similarto (1).

As described above, in the first embodiment, the output interval of apacket from the transmission unit 304 to the ring bus 104, that is,input of data from the outside to the ring bus 104 is controlled bycontrolling a stall signal to be output from the output terminal 354. Inthe above description, the transmission interval control unit 504controls validation and invalidation of a stall signal to be output fromthe output terminal 354 based on a stall signal from the input terminal353, but may control it based on only the value of the stall counter405. That is, input may be suspended based on only whether the number ofpackets suspended from output becomes equal to or larger than apredetermined value. In this case, a stall signal to be output from theoutput terminal 354 can be controlled more simply.

Although one input/output unit 101 performs input and output in theabove description, the present invention is not limited to this. It isalso possible to prepare an input unit and output unit separately,control input of data onto the ring bus 104 by the input unit, andcontrol output of data from the ring bus 104 by the output unit. In thiscase, the output unit notifies the input unit of the value of the stallcounter 405 and a stall signal from the input terminal 353 by using aseparately prepared information notification mechanism or the like. Theinput unit performs input control based on the notified/acquiredinformation. The information may be contained in a packet and notified.When a packet contains the information, for example, the input unit isarranged on the ring bus 104 to be adjacent downstream to the outputunit. If the output unit is arranged to be adjacent downstream to theinput unit, information from the output unit reaches the input unitthrough one round of the ring bus. This makes it difficult to properlyperform input control and suspend data input.

As described above, in the input/output unit 101, the transmission unit304 acquires the value of the stall counter 405 and a stall signal fromthe input terminal 353. The input side of the data processing system cantherefore grasp a state in which data output stays on the output side.When data output stays and many valid packets which have not been outputexist on the ring bus, a deadlock can be effectively prevented byreducing the amount of data to be input to the ring bus. In other words,input of data from the input side can be stopped early before the ringbus 104 is congested with stall packets. Immediately after canceling thestate in which many stall packets exist on the ring bus 104, the stop ofdata input can be canceled, and optimum data input suited to the degreeof congestion of the ring bus can be implemented. By considering thedegree of congestion of packets on the ring bus, the frequency of datainput can be maintained appropriately without extremely decreasing it.

<<Second Embodiment>>

A transmission interval control unit 504 according to the secondembodiment of the present invention will be described with reference toFIG. 7. Note that the data structure of a packet, and the arrangementsand operations of a data processing system, an input/output unit 101, acommunication unit 102, and a reception unit 301 and transmission unit304 in the input/output unit 101 are the same as those in the firstembodiment, and a description thereof will not be repeated.

In FIG. 7, the same reference numerals as those in FIG. 6 in the firstembodiment denote functional units having the same functions, and adescription thereof will not be repeated. The second embodiment isdifferent from the first embodiment in that a comparator 701 replacesthe comparator 602, and a second register 702 is added. Further, atransmission interval signal generation unit 703 replaces thetransmission interval signal generation unit 603. The input terminal 353is omitted because it is not used in the second embodiment.

The comparator 701 compares a stall counter value from a signal line 365with the first predetermined value stored in a first register 604 andthe second predetermined value stored in the second register 702. Morespecifically, the comparator 701 keeps outputting a value “1” until,after the stall counter value increases and becomes equal to or largerthan the first predetermined value in the first register 604, itdecreases and becomes equal to or smaller than the second predeterminedvalue in the second register 702.

In this case, when the second predetermined value is larger than thefirst predetermined value, the stall counter value may decrease withoutexceeding the second predetermined value after exceeding the firstpredetermined value. In this case, when the stall counter value becomessmaller than the first predetermined value, the comparator 701 mayoutput “0” regardless of the second predetermined value. Hence, evenwhen the stall counter value greatly increases as the number of stallpackets on a ring bus 104 increases, input of data can restartimmediately after data is output outside and the number of stall packetstends to decrease. By setting the first predetermined value to be smallto some extent, acceptance of data input from the outside is suspendedimmediately when a sign of increasing the number of stall packetsappears. This can greatly reduce the possibility of occurrence of adeadlock on the ring bus 104.

The first predetermined value of the first register 604 may be largerthan the second predetermined value of the second register 702. In thiscase, the comparator 701 keeps outputting “1” until the stall countervalue becomes equal to or smaller than the second predetermined valueafter becoming equal to or larger than the first predetermined value. Inthis case, input of data does not restart immediately after the value ofa stall counter 405 becomes lower than the value of the first registerupon output of stall packets after it exceeds the value of the firstregister to suspend input. After stall packets are output by apredetermined number or more and the value of the stall counter 405becomes smaller than the value of the second register, input starts.

In any case, the first register 604 is a register which stores the firstpredetermined value for deciding a start point at which the comparisonresult of the comparator 701 becomes “1”. The second register 702 is aregister which stores the second predetermined value for deciding astart point at which the comparison result of the comparator 701 becomes“0”. However, when the first predetermined value is smaller than thesecond predetermined value, the first predetermined value also serves asa threshold for deciding a start point at which the comparison result ofthe comparator 701 becomes “0”, similar to the first embodiment. Thepredetermined values of the first register 604 and second register 702need to be smaller than the number of packets which can be stored in oneround of the ring bus. This is because, when a deadlock occurs, thevalue of the stall counter 405 becomes a value equal to or larger thanthe number of packets which can be stored in one round of the ring bus.If the predetermined values set to this value, no deadlock can beprevented.

Based on an output from the comparator 701, an output from a timer 601,and an output from a signal line 363, the transmission interval signalgeneration unit 703 generates a stall signal to be output to an outputterminal 354.

The operation of the transmission interval control unit 504 in FIG. 7will be explained. First, the values of the first register 604, a timerregister 605, and the second register 702 are set as initial settings bya CPU (not shown) or the like. Then, the comparator 701 compares a stallcount value from the signal line 365 with the first and secondpredetermined values. At the same time, if the value of the timer 601 isnot “0”, the timer 601 is counted down. The transmission interval signalgeneration unit 703 executes one of the following three differentoperations in accordance with a valid flag from the signal line 363 andthe value of an output from the comparator 701.

(1) Case in which Valid Flag from Signal Line 363 is Valid

In this case, a packet generated by a packet generation unit 503 cannotbe output. Thus, the transmission interval signal generation unit 703validates the stall signal from the output terminal 354, and thensuspends input of data from the outside. In other cases, the followingoperation (2) or (3) is performed.

(2) Case in which Output from Comparator 701 is “0”

In this case, the value of the stall counter 405 is smaller than asmaller one of the first and second predetermined values. Alternatively,the value of the stall counter 405 becomes equal to or larger than alarger one of the first and second predetermined values, then decreases,and becomes equal to or smaller than the second predetermined value.Also, when the first predetermined value is smaller than the second one,the value of the stall counter 405 becomes equal to or larger than thefirst predetermined value, then decreases, and becomes smaller than thefirst predetermined value without becoming equal to or larger than thesecond predetermined value.

In these cases, the transmission interval signal generation unit 703controls a stall signal from the output terminal 354 in accordance withthe value of the timer 601. More specifically, the transmission intervalsignal generation unit 703 outputs, from the output terminal 354, astall signal indicating “invalid” when the value of the timer 601 is 0,and a stall signal indicating “valid” in other cases.

(3) Case in which Output from Comparator 701 is “1”

In this case, after the value of the stall counter 405 becomes equal toor larger than the value of the first register, it increases ordecreases, but does not become equal to or smaller than the value of thesecond register 702. Also, when the first predetermined value is smallerthan the second one, the value of the stall counter 405 becomes equal toor larger than the first predetermined value, and then becomes neitherequal to or larger than the second predetermined value nor smaller thanthe first predetermined value. In these cases, the frequency ofoccurrence of stall packets in the input/output unit 101 is high. Inthese cases, the transmission interval signal generation unit 703outputs, from the output terminal 354, a stall signal indicating“valid”, and suspends input of data from the outside.

As described above, in the second embodiment, a stall signal from theoutput terminal 354 is controlled using the output result of thecomparator 701 that is based two predetermined values. For example, thefirst predetermined value is set to be smaller than the secondpredetermined value. In this case, even when the number of stall packetson the ring bus 104 greatly increases, input of data can restartimmediately after data is output outside and the number of stall packetstends to decrease. By setting the first predetermined value to be smallto some extent, acceptance of data input from the outside is suspendedimmediately when a sign of increasing the number of stall packetsappears. This can greatly reduce the possibility of occurrence of adeadlock on the ring bus 104. Setting the first predetermined value tobe larger than the second one can prevent frequent switching betweenstall of input and cancellation of it.

Although a single data path has been described above, the presentinvention is also applicable to a multi-data path. When the presentinvention is applied to a multi-data path, a data path ID may be set inthe format of a packet to identify a data path for processing thepacket. When the multi-data path is handled, the threshold of a stallcounter may be set for each data path. For example, for a data path onwhich a packet is preferentially processed, a counter value serving asthe trigger of input stop may be set to be larger than a counter valueserving as the trigger of input stop for another data path.

In the above description, the DMAC executes packetization anddepacketization. However, the CPU may prepare a data packet and commandpacket and directly input them to the DRAM.

The schematic arrangement views of the respective units of the dataprocessing apparatus used in the description of the embodiments aim toexplain connections between circuits and functional units, and do notintend to limit the positional relationship and the number of componentsin each arrangement. For example, it suffices to arrange three or morecommunication units (including inputs and outputs) in order to practicethe present invention. Also, it suffices to arrange two or moreprocessing units.

In the above embodiments, image data is a processing target fordescriptive convenience. However, the present invention is alsoapplicable to a processing apparatus which processes data other than animage, such as moving image data, audio data, or numerical data.

(Other Embodiments)

Aspects of the present invention can also be realized by a computer of asystem or apparatus (or devices such as a CPU or MPU) that reads out andexecutes a program recorded on a memory device to perform the functionsof the above-described embodiment(s), and by a method, the steps ofwhich are performed by a computer of a system or apparatus by, forexample, reading out and executing a program recorded on a memory deviceto perform the functions of the above-described embodiment(s). For thispurpose, the program is provided to the computer for example via anetwork or from a recording medium of various types serving as thememory device (for example, computer-readable storage medium).

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application Nos.2012-014576 filed on Jan. 26, 2012, and 2012-238359 filed on Oct. 29,2012, which are hereby incorporated by reference herein in theirentirety.

What is claimed is:
 1. An input and output control apparatus whichaccepts input of data from outside of a data processing system, inputsthe data to a bus in the data processing system and outputs data, forwhich processing by the data processing system is completed, from thebus to outside, wherein the data processing system includes a pluralityof communication units and a plurality of processing units and theplurality of communication units are connected by the bus in a ringshape and data processed by the plurality of processing units aredelivered via the bus in the data processing system, the input andoutput control apparatus comprising: a reception unit configured toreceive, from the bus, data for which all processing by the dataprocessing system has been completed and thereby the data being in astate to be output to the outside; a determination unit configured todetermine whether output of the data, for which all processing by thedata processing system has been completed, from the bus to the outsideis possible or not; a transmission unit configured to transmit, to thebus, the data for which all processing by the data processing system hasbeen completed but of which the output from the bus to the outside hasbeen suspended in a case where the determination unit determines thatthe output of the data, for which all processing by the data processingsystem has been completed, from the bus to the outside is not possible;a counting unit configured to count a number of data items for which allprocessing by the data processing system has been completed, of whichthe output to the outside is suspended according to the determination bythe determination unit, and which remain on the bus; and a control unitconfigured to control input of data from the outside to the bus based onthe number of the data items.
 2. The apparatus according to claim 1,wherein when the number of the data items is larger than or equal to afirst predetermined value, the control unit suspends input of data fromthe outside.
 3. The apparatus according to claim 1, wherein the controlunit suspends input of data from the outside from the point when thenumber of the data items becomes larger than or equal to a firstpredetermined value until the number of the data items becomes less thanor equal to a second predetermined value larger than the firstpredetermined value by decreasing after exceeding the secondpredetermined value.
 4. The apparatus according to claim 1, wherein thecontrol unit suspends input of data from the outside from the point whenthe number of the data items becomes larger than or equal to a firstpredetermined value until the number of the data items becomes less thanor equal to a second predetermined value smaller than the firstpredetermined value.
 5. The apparatus according to claim 1, wherein thecontrol unit further controls input of data from the outside based oninformation representing whether output of data to the outside issuspended.
 6. A control method for an input and output control apparatuswhich accepts input of data from outside of a data processing systeminputs the data to a bus in the data processing system and outputs data,for which processing by the data processing system is completed, fromthe bus to outside, wherein the data processing system includes aplurality of communication units and a plurality of processing units andthe plurality of communication units are connected by the bus in a ringshape and data processed by the plurality of processing units aredelivered via the bus in the data processing system, the methodcomprising: receiving, from the bus, data for which all processing bythe data processing system has been completed and thereby the data beingin a state to be output to the outside; determining whether output ofthe data, for which all processing by the data processing system hasbeen completed, from the bus to the outside is possible or not;transmitting, to the bus, the data for which all processing by the dataprocessing system has been completed but of which the output from thebus to the outside has been suspended in a case where it is determinedthat the output of the data, for which all processing by the dataprocessing system has been completed, to the outside from the bus is notpossible; counting a number of data items for which all processing bythe data processing system has been completed, of which the output tothe outside is suspended according to the determination at thedetermining, and which remain on the bus; and controlling input of datafrom the outside to the bus based on the number of the data items. 7.The apparatus according to claim 1, wherein the reception unit receivesthe data for which all processing by the data processing system has beencompleted, and wherein the reception unit outputs, to the outside, thedata for which all processing by the data processing system has beencompleted, in a case where the determination unit determines that theoutput of the data, for which all processing by the data processingsystem has been completed, from the bus to the outside is possible. 8.The apparatus according to claim 1, wherein the counting unit incrementsa count value when the output of the data, for which all processing bythe data processing system has been completed, to the outside from thebus is suspended according to the determination by the determinationunit, and decrements the count value in a case where the count value isequal to or greater than 1 and the reception unit outputs, to theoutside, the data for which all processing by the data processing systemhas been completed.
 9. The apparatus according to claim 1, wherein thereception unit outputs the data, for which all processing by the dataprocessing system has been completed, from the bus to the outside basedon a signal indicating whether output of data from the bus to theoutside is possible.
 10. The apparatus according to claim 1, wherein thedetermination unit further performs the determination based on thesignal indicating whether output of data from the bus to the outside ispossible.
 11. The apparatus according to claim 1, wherein the receptionunit transmits, from the bus to the outside, data for which allprocessing by the data processing system has been completed.
 12. Theapparatus according to claim 11, wherein the transmission unit causesthe data, for which all processing by the data processing system hasbeen completed, to go around the bus in the data processing system in acase where the determination unit determines that it is not possible tooutput the data for which all processing by the data processing systemhas been completed.
 13. The apparatus according to claim 1, wherein thecontrol unit permits input of data from the outside in a case where thedata for which all processing by the data processing system has beencompleted but of which the output from the bus to the outside has beensuspended is output to the outside and the number of the data items ischanged from a first value at which input of data from the outside issuspended to a second value at which input of data from the outside ispermitted.
 14. The apparatus according to claim 1, wherein thedetermination unit determines whether output of the data, which isreceived by the reception unit and for which all processing by the dataprocessing system has been completed, from the bus to the outside ispossible or not.
 15. The apparatus according to claim 1, wherein theinput and output control apparatus is included in the data processingsystem and is neither the plurality of communication units nor theplurality of processing units.
 16. An input and output control apparatuswhich accepts input of data from outside of a data processing system,inputs the data to a bus in the data processing system and outputs data,for which processing by the data processing system is completed, fromthe bus to outside, wherein the data processing system includes aplurality of communication units and a plurality of processing units andthe plurality of communication units are connected by the bus in a ringshape and data processed by the plurality of processing units aredelivered via the bus in the data processing system, the input andoutput control apparatus comprising: a reception unit configured toreceive, from the bus, data that is in a state to be output to theoutside; a determination unit configured to determine whether output ofthe data that is received by the reception unit and is in a state to beoutput from the bus to the outside is possible or not; an output unitconfigured to output the data that is received by the reception unit andis in a state to be output from the bus to the outside in a case wherethe determination unit determines that the output of the data that is ina state to be output from the bus to the outside is possible; atransmission unit configured to transmit, to the bus, the data that isin a state to be output from the bus to the outside in a case where thedetermination unit determines that the output of the data that is in astate to be output from the bus to the outside is not possible; acounting unit configured to count a number of data items which are in astate to be output from the bus to the outside, of which the output tothe outside is suspended according to the determination by thedetermination unit, and which remain on the bus; and a control unitconfigured to control input of data from the outside to the bus based onthe number of the data items.
 17. A control method for an input andoutput control apparatus which accepts input of data from outside of adata processing system, inputs the data to a bus in the data processingsystem and outputs data, for which processing by the data processingsystem is completed, from the bus to outside, wherein the dataprocessing system includes a plurality of communication units and aplurality of processing units and the plurality of communication unitsare connected by the bus in a ring shape and data processed by theplurality of processing units are delivered via the bus in the dataprocessing system, the method comprising: receiving, from the bus, datathat is in a state to be output to the outside; determining whetheroutput of the data that is received by the reception unit and is in astate to be output from the bus to the outside is possible or not;outputting the data that is received by the reception unit and is in astate to be output from the bus to the outside in a case where it isdetermined that the output of the data that is in a state to be outputfrom the bus to the outside is possible; transmitting, to the bus, thedata that is in a state to be output from the bus to the outside in acase where it is determined that the output of the data that is in astate to be output from the bus to the outside is not possible; countinga number of data items which are in a state to be output from the bus tothe outside, of which the output to the outside is suspended accordingto the determination at the determining, and which remain on the bus;and controlling input of data from the outside to the bus based on thenumber of the data items.